Skip to content

fix(platform): land every delete on its overview page - #4381

Merged
yannickmonney merged 4 commits into
mainfrom
fix/delete-returns-to-overview
Oct 6, 2026
Merged

yannickmonney merged 4 commits into
mainfrom
fix/delete-returns-to-overview

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

After a delete, the reader now lands on the entity's overview, never on a page that names what they just deleted. An inventory of every delete surface in the platform found four places that got this wrong.

What changes

  • Projects. Deleting a project from its General tab's danger zone left the reader on "We couldn't find that project". The dialog only navigated when a caller passed navigateOnSuccess, and the danger zone never did. The dialog now reads the open route: if the deleted project is the one on screen, it replaces the page with /projects. Deleted from the list, it stays put and keeps the ?teams= filter.
  • Chat. Deleting the open chat (header ⋯ or its own row) went to plain /chat, which resumes the most recent chat. The list hasn't re-read yet, so that could reopen the deleted chat ("This chat is not available") or another one. ThreadDeleteDialog now owns the leave: if the route's thread was deleted, it replaces the page with a fresh chat (?new). The header and row callers no longer pass onDeleted.
  • Documents.
    • Deleting a subfolder from its row always jumped to the Documents root, losing the reader's place and filters. It now stays in the current folder; the row simply leaves the list. The onFolderDeleted plumbing is gone.
    • A deleted folder's address never recovered. The pg backend refuses its breadcrumb with 404 (403 out of reach), and the adapter surfaced that as an error, so the existing "empty trail → root" self-heal never ran. The adapter now answers [] for those refusals, as the 0.4 read did. The self-heal replaces the dead address instead of pushing a new entry, so Back can't loop into it.
  • Automations. The rail tile reopens the last automation visited. Its restore fallback covered an unknown slug but not a deleted automation, which answers AUTOMATION_DELETED. After a delete from the list, the tile opened the deletion banner. A restored arrival now forgets it and lands on the list. A deliberate arrival, such as a run link, keeps the banner and the run history.

Already correct and unchanged:

  • the task page (lands on the project's board) and the ?task= sheet
  • conversations (spam delete clears ?conversation= with replace)
  • organization deletion
  • project folders (?folderId= cleared)
  • every list-row and bulk delete

Verification

  • Regression tests for each fix. Each new navigation test fails on the old code and passes on the fix:
    • project-delete-dialog.test.tsx (+4)
    • thread-delete-dialog.test.tsx (new)
    • documents-table.folder-delete.test.tsx (new; the real table, columns, row menu and confirmation)
    • breadcrumb-navigation.test.tsx (+3)
    • documents.breadcrumb.test.ts (+3)
    • automation-detail-shell.test.tsx (+2)
  • tsc --noEmit for the platform (before rebase), and oxlint --type-aware plus oxfmt --check on every changed file.
  • tests/guards (252 tests), lint:manual, and check-guide.ts on the four touched suites.
  • Related UI suites: 1000 of 1005 passed. The 5 failures were load-induced timeouts at a load average of 45–69:
    • The chat-surface axe audits fail the same way on the unchanged files (3 of 3 runs).
    • The cloud-import and project-agents tests passed in isolation.
  • Not done: a live-browser walk-through. The machine is out of disk, so no dev stack was started. The manual boxes below cover it.

Manual layer

  • New boxes: PROJ-F40, CHAT-F61, KNOW-F37, AUTO-F56.
  • One reference/automation.md row for their component halves.
  • Suite cost headers and readme counts bumped.

Noticed, not changed: NAV-F16 still says a rail click always opens a section's first page. #3959 brought back the Knowledge-tab and automation memories without updating that box.

@yannickmonney
yannickmonney force-pushed the fix/delete-returns-to-overview branch 3 times, most recently from aff936e to 4b0216e Compare October 5, 2026 19:20
Deleting a project from its General tab's danger zone left the reader on
"We couldn't find that project": the dialog navigated only when a caller
passed `navigateOnSuccess`, and the danger zone never did. The dialog now
reads the open route instead. When the deleted project is the one on
screen, it replaces that page with the projects list; deleted from the
list, it stays there and keeps the list's Teams filter.
Deleting the chat on screen, from its header or its row, went to plain
`/chat`, which resumes the most recent chat. The thread list has not read
again by then, so the resume could pick the chat just deleted and land on
"This chat is not available", or else drop the reader into another chat.
The delete dialog now leaves the deleted conversation itself: when the
route's thread is the one deleted, it replaces the page with a fresh chat
(`?new`). Deleting any other chat keeps the open one on screen.
A folder deleted from its row always sits in the folder on screen, yet the
page then jumped to the Documents root and lost the reader's place. The
delete now only closes its confirmation, and the row leaves the list.

A deleted folder's own address never recovered either. Its breadcrumb read
is refused with 404 (403 out of reach), and the adapter surfaced that as
an error, so the self-heal waiting for an empty trail never ran. The page
showed an empty folder that no longer exists, with uploads still aimed at
it. The adapter now answers no trail for those refusals, as the 0.4 read
did, so the page toasts "Folder not found or no longer accessible" and
replaces the dead address with the root. Any other failure stays an error.
The rail tile reopens the automation last visited, and the detail shell
already falls back to the list when that automation is unknown. It missed
a DELETED one: that read answers AUTOMATION_DELETED with a date, not "not
found". After deleting an automation from the list, the tile still opened
its deletion banner. A restored arrival at a deleted automation now forgets
it and lands on the list, while a deliberate arrival, such as a run link,
keeps the banner and the run history.

The coverage register gains one row for the component halves of the new
boxes PROJ-F40, CHAT-F61, KNOW-F37 and AUTO-F56.
@yannickmonney
yannickmonney force-pushed the fix/delete-returns-to-overview branch from 4b0216e to 9517faa Compare October 5, 2026 21:29
@yannickmonney
yannickmonney merged commit 02f76bc into main Oct 6, 2026
@yannickmonney
yannickmonney deleted the fix/delete-returns-to-overview branch October 6, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant